#include <func.h>
void func(int sig)
{
    printf("before sleep %d\n",sig);
    sleep(5);
    printf("after sleep %d\n",sig);
}
int main(int argc,char *argv[])
{
    struct sigaction act;
    memset(&act,0,sizeof(act));
    act.sa_handler=func;
    sigaction(2,&act,NULL);
    sigaction(3,&act,NULL);
    while(1);
    return 0;
}

